package com.mini.model;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;

import javax.persistence.*;
import java.io.Serializable;
import java.util.Date;

/**
 * @author shixiaopeng  on 2020/12/7
 */
@Entity(name = "business_chance_convert_record")
@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
@DynamicUpdate
@DynamicInsert
public class BusinessChanceConvertRecord implements Serializable {

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Long id;

    @ApiModelProperty(value = "机会id")
    private Long chanceId;

    @ApiModelProperty(value = "原咨询师")
    private Long oldTeacherId;

    @ApiModelProperty(value = "原咨询师名称")
    private String oldTeacherName;

    @ApiModelProperty(value = "现咨询师")
    private Long newTeacherId;

    @ApiModelProperty(value = "现咨询师名称")
    private String newTeacherName;

    @ApiModelProperty(value = "创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @Column(insertable = false, updatable = false)
    Date createTime;

    @ApiModelProperty(value = "创建时间")
    @JsonFormat(pattern = "HH:mm:ss", timezone = "GMT+8")
    @Transient
    Date time;

    @ApiModelProperty(value = "拨打次数（包括未打通）")
    private Integer callNum;

    private Long operationId;

    private String operationName;

    private String searchParams;
}
